import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Unocss from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

export default defineConfig({
  plugins: [
    Unocss({
      configFile: './uno.config.ts',
    }),
    vue(),
    AutoImport({
      resolvers:[ElementPlusResolver()],
      imports: ['vue', 'vue-router', 'pinia'],
      dts: true,
      dirs:[
        './src/router',
        './src/api',
        './src/composables'
      ]
    }),
    Components({
      resolvers:[ElementPlusResolver()]
    })
  ],
})
